package com.pasabahceambalaj.session;

import com.pasabahceambalaj.entity.*;
import java.util.ArrayList;
import java.util.List;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;

@Name("firmaHome")
public class FirmaHome extends EntityHome<Firma> {

	public void setFirmaId(Long id) {
		setId(id);
	}

	public Long getFirmaId() {
		return (Long) getId();
	}

	@Override
	protected Firma createInstance() {
		Firma firma = new Firma();
		return firma;
	}

	public void load() {
		if (isIdDefined()) {
			wire();
		}
	}

	public void wire() {
		getInstance();
	}

	public boolean isWired() {
		return true;
	}

	public Firma getDefinedInstance() {
		return isIdDefined() ? getInstance() : null;
	}

	public List<Isemir> getIsemirs() {
		return getInstance() == null ? null : new ArrayList<Isemir>(getInstance().getIsemirs());
	}

	public List<Kalip> getKalips() {
		return getInstance() == null ? null : new ArrayList<Kalip>(getInstance().getKalips());
	}

	public List<Kullanici> getKullanicis() {
		return getInstance() == null ? null : new ArrayList<Kullanici>(getInstance().getKullanicis());
	}

	public List<Malzeme> getMalzemes() {
		return getInstance() == null ? null : new ArrayList<Malzeme>(getInstance().getMalzemes());
	}

	public List<Rol> getRols() {
		return getInstance() == null ? null : new ArrayList<Rol>(getInstance().getRols());
	}

	public List<Urun> getUruns() {
		return getInstance() == null ? null : new ArrayList<Urun>(getInstance().getUruns());
	}

}
